<script setup>
import CbMenu from '@/components/layout/Menu.vue'
import CbHeader from '@/components/layout/Header.vue'
import { useMenuStore } from '@/store/menu.js'

defineOptions({
  name: '/'
})

const menuStore = useMenuStore()
</script>

<template>
  <div class="cb-container">
    <el-container class="cb-container-1">
      <el-aside class="cb-aside-box">
        <cb-menu></cb-menu>
      </el-aside>
      <el-container>
        <el-header class="cb-header-box">
          <cb-header></cb-header>
        </el-header>
        <el-main>
            <router-view :key="menuStore.refreshKey"></router-view>
        </el-main>
      </el-container>
    </el-container>
  </div>
</template>

<style lang="scss" scoped>
.cb-container {
  width: 100%;
  height: 100%;
  background-color: $cb-bg-color-darker;

  .cb-container-1 {
    height: 100%;

    .cb-aside-box {
      height: 100%;
      width: auto;
    }

    .cb-header-box {
      padding: 0;
      margin: 0;
      display: flex;
      justify-content: center;
      align-items: center;
      height: 98px;
    }
  }
}
</style>
